package usage

import (
	"flag"
	"lnzw/common/proto/common_gen"
)

var USAGE Usage

type Usage struct {
	ServerType common_gen.ServerType //服务器类型
	ConfigPath string                //配置路径
}

func Parse() {
	flag.StringVar(&USAGE.ConfigPath, "configPath", "../config/game.yaml", "")
	var serverType string
	flag.StringVar(&serverType, "serverType", common_gen.ServerType_name[int32(common_gen.ServerType_url)], "")
	flag.Parse()
	USAGE.ServerType = common_gen.ServerType(common_gen.ServerType_value[serverType])
}
